package org.jeecg.modules.oa.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.oa.entity.NodePosition;

import java.util.List;

/**
 * @Description: 审批节点岗位表
 * @Author: jeecg-boot
 * @Date:   2019-12-04
 * @Version: V1.0
 */
public interface NodePositionMapper extends BaseMapper<NodePosition> {

    void savePositionBatch(@Param("nodeId") String nodeId,@Param("mainId")String mainId,  @Param("positionIdList") List<String> positionIdList);
    @Select("select * from pd_node_position where node_id =#{nodeId} and del_flag ='0'")
    List<NodePosition> selectByNodeId(@Param("nodeId") String nodeId);

   Integer deleteByNodeId(@Param("nodePositions") List<NodePosition> nodePositions);
}
